<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic xml:lang="en" id="topic1">
  <title>pg_foreign_data_wrapper</title>
  <body>
    <p>The system catalog table <codeph>pg_foreign_data_wrapper</codeph> stores foreign-data wrapper definitions. A foreign-data wrapper is a mechanism by which you access external data residing on foreign servers.</p>
    <table id="table_zgy_xfx_tz">
      <title>pg_catalog.pg_foreign_data_wrapper</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/>
        <colspec colnum="2" colname="col2" colwidth="86pt"/>
        <colspec colnum="3" colname="col3" colwidth="85pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1"><codeph>fdwname</codeph></entry>
            <entry colname="col2">name</entry>
            <entry colname="col3"/>
            <entry colname="col4">Name of the foreign-data wrapper.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>fdwowner</codeph></entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_authid.oid</entry>
            <entry colname="col4">Owner of the foreign-data wrapper.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>fdwhandler</codeph></entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">A reference to a handler function that is responsible for supplying execution routines for the foreign-data wrapper. Zero if no handler is provided.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>fdwvalidator</codeph></entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">A reference to a validator function that is responsible for checking the validity of the options provided to the foreign-data wrapper. This function also checks the options for foreign servers and user mappings using the foreign-data wrapper. Zero if no validator is provided.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>fdwacl</codeph></entry>
            <entry colname="col2">aclitem[]</entry>
            <entry colname="col3"/>
            <entry colname="col4">Access privileges; see <codeph><xref href="../sql_commands/GRANT.xml#topic1" type="topic" format="dita"/></codeph> and <codeph><xref href="../sql_commands/REVOKE.xml#topic1" type="topic" format="dita"/></codeph> for details.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>fdwoptions</codeph></entry>
            <entry colname="col2">text[]</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">Foreign-data wrapper-specific options, as "keyword=value" strings.</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
